package service.impl;

import dao.Userselect;
import dao.impl.UserselectImpl;
import entity.Jilu;
import entity.User;
import entity.dao.JiluDao;
import service.userservice;

import java.sql.SQLException;
import java.text.ParseException;
import java.util.Collections;
import java.util.List;

public class userserviceImpl implements userservice {
    Userselect userselect = new UserselectImpl();

    @Override
    public List<User> getall() throws SQLException, ClassNotFoundException, ParseException, IllegalAccessException {
        return userselect.getall();
    }

    @Override
    public int adduser(Jilu jilu) throws SQLException, ClassNotFoundException {
        return userselect.adduser(jilu);
    }

    @Override
    public User getuser(int id) throws SQLException, ClassNotFoundException {
        return userselect.getuser(id);
    }

    @Override
    public List<JiluDao> getusers(String fu, String shou, String time, int c, int limit) throws SQLException, ClassNotFoundException, ParseException, IllegalAccessException {
        return userselect.getusers(fu, shou, time, c, limit);
    }

    @Override
    public int[] updateuser(int money, int id, int money1, int id1) throws SQLException, ClassNotFoundException {
        return userselect.updateuser(money, id, money1, id1);
    }

    @Override
    public int count(String fu, String shou, String time) throws SQLException, ClassNotFoundException {
        return userselect.count(fu, shou, time);
    }
}
